
<%@ page contentType="text/html;charset=UTF-8" language="java" import="com.scalar.chiptrack.finance.purchaseorder.PurchaseOrder,
           com.scalar.chiptrack.utils.StringUtils, com.scalar.chiptrack.utils.ConfigManager,
                                                                       com.scalar.chiptrack.finance.purchaseorder.PurchaseOrderLineItem"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<script language="javaScript">
var newWindow = null;
function sendMail()
{
    var poNumber = document.purchaseOrderForm.poNumber.value;
    newWindow = window.open ('<%=chipTracContext%>/poSendMail.do?poNumber='+poNumber,'sendMailPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=800,height=480,resizable=yes');
    newWindow.focus();
}

//When this page unloaded, closing the Child Window if it is open.
function onUnload()
{
    if ( newWindow != null )
    {
        newWindow.close();
    }
}

function refresh()
{
    window.opener.refresh();
}
</script>
<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>
<style type="text/css">
a { text-decoration : none}
</style>
</HEAD>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0" onUnload="javascript:onUnload();">
<center><h2>Purchase Order Acknowledgement</h2></center>
<html:html>
<!-- from here your body starts -->
<html:form name="purchaseOrderForm" action="/purchaseOrder.do?action=new" method="post" type="com.scalar.chiptrack.finance.purchaseorder.forms.PurchaseOrderForm">
<!--p STYLE="page-break-after: always"-->
<nested:nest property="purchaseOrder">
<table width="98%" cellspacing='0' cellpadding='0' border="0" align="center">
    <tr>
        <td width="34%" align="center"><img src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" height="72" width='180' border=0></td>
        <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
        <td widht="34%" align="center" class="NArialL"><br><nested:write property="clientAddressAsHTML" filter="false"/><br> </td>
        <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
        <td width="10%" align=center><font class="NArialW">
        <table width='80' align=left border='0' background='<%=chipTracContext%>/jsp/includes/images/printer_icon_small.gif' title='Click here to Print Purchase Order'><tr><td>
        <a href="javascript:window.print();" title='Click here to Print Purchase Order'>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></td>
        </tr></table>
        <!--br--></font></td>
        <!--% String show = "";
            show = (String)request.getAttribute( "show" );
            if( show.equalsIgnoreCase("show") ){%-->
         <td width="15%">
			<table border ="0"  background='<%=chipTracContext%>/jsp/includes/images/email1.gif'>
				<tr>
					<td>
						<a href="javascript:sendMail();" title='Click here to send mail'>&nbsp;&nbsp;&nbsp;&nbsp;</a>
					</td>
				</tr>
			</table>
        </td><!--%}%-->
   </tr>
</table>
<table width="98%" cellspacing='0' cellpadding='0' border="0" align="center">
   <tr><td  width="1%" colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=5></td></tR>
   <tr>
        <td width="15%" valign="top"  height="100%">
            <table border="1" width="100%" bordercolor='#000000' cellspacing='0' cellpadding='0' height="100%">
                <tr height="20"><td class="NArialL" bgcolor="#DEE1E2">Purchase Order :</td></tr>
                <tr height="20"><td class="NArialL" bgcolor="#FFFFEE" valign="top">
                    <table width="100%" class="NArialL" height="80" cellspacing="0" cellpadding="0" valign="top">
                        <tr><td valign="top">Purchase Order No.&nbsp;<nested:write property="poNumber" /></td></tr>
                            <input type = "hidden" name = "poNumber" value = '<nested:write property="poNumber" />'>
                            <tr><td>Date&nbsp;<nested:write property="poDate"/></td></tr>
                            <tr><td>&nbsp;</td></tr>
                            <tr><td>&nbsp;</td></tr>
                            <tr><td>&nbsp;</td></tr>
                            <tr><td>&nbsp;</td></tr>
                            <tr><td>&nbsp;</td></tr>
                    </table></td>
                </tr>
            </table>
        </td>
        <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
        <td width="15%" valign="top" height="100%">
            <table border="1" width="100%" bordercolor="#000000" cellspacing="0" cellpadding="0"  height="100%">
                <tr height="20"><td class="NArialL" bgcolor="#DEE1E2">Vendor :</td></tr>
                <tr height="20"><td class="NArialL" bgcolor="#FFFFEE" valign="top">
                    <table width="100%" class="NArialL" height="90" cellspacing='0' cellpadding='0'  valign="top">
                        <tr><td valign="top"><nested:write property="formattedVendorAddressAsHtml" filter="false"/></td></tr>
                        <tr><td>&nbsp;</td></tr>
                        <tr><td>&nbsp;</td></tr>
                    </table></td>
                </tr>
            </table>
        </td>
        <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
        <td width="15%" valign="top">
            <table border="1" width="100%" bordercolor="#000000" cellspacing="0" cellpadding="0"  height="100%">
                <tr height="20"><td class="NArialL" bgcolor="#DEE1E2">Ship To :</td></tr>
                <tr height="20"><td class="NArialL" bgcolor="#FFFFEE" valign="top">
                    <table width="100%" class="NArialL" height=90 cellspacing='0' cellpadding='0' valign="top">
                        <tr><td valign="top"><nested:write property="formattedShippingAddressAsHtml" filter="false"/></td></tr>
                        <tr><td>&nbsp;</td></tr>
                        <tr><td>&nbsp;</td></tr>
                    </table></td>
                </tr>
            </table>
        </td>
        <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
   </tr>
   <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=5></td></tR><%--
    //commented by phani 06/04/2004
   <tr>
        <td class="NArialL" height='20'>
            <table width="100%" class="NArialL" border=1 bordercolor='#000000' cellspacing='0' cellpadding='0'>
                <tr height=20><td bgcolor='#DEE1E2'>Shipping Method</td><td bgcolor='#DEE1E2'>Payment Terms</td></tr>
                <tr height=20><td bgcolor='#FFFFEE'><nested:write property="shippingMethod"/>&nbsp;</td><td bgcolor='#FFFFEE'><nested:write property="paymentTermId" />&nbsp;</td></tr>
            </table>
        </td>
        <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
        <td class="NArialL" height='20'>
            <table width="100%" class="NArialL" border=0 cellspacing='0' cellpadding='0'>
                <tr height=20><td>&nbsp;</td><td>&nbsp;</td></tr>
                <tr height=20><td>&nbsp;</td><td>&nbsp;</td></tr>
            </table>
        </td>
        <td width='1%'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
        <td class="NArialL" height='20'>
            <table width="100%" class="NArialL" border="0" cellspacing='0' cellpadding='0'>
                <tr height=20><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
                <tr height=20><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
            </table>
        </td>
   </tr>   --%>
   <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=5></td></tR>
   <tr><td colspan=5 class='NArialL'>&nbsp;</td></tR>
   <tr><td class='NArialL'><u>Comments:</u></td><td colspan=4 class='NArialL'>&nbsp;</td> </tR>
   <tr  bgcolor='#DEE1E2'><td colspan=5 class='NArialL'><nested:write property="commentDescription" /></td></tR>
   <tr><td colspan=5 class='NArialL'>&nbsp;</td></tR>

   <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=5></td></tR>
   <tr><td colspan='5'>

      <table width="100%" border=1 bordercolor='#000000' cellspacing='0' cellpadding='0'>
        <tr height="20">
            <td width="3%" class="NArialR" bgcolor='#DEE1E2' align="center">Line Item</td>
            <td width="5%" class="NArialR" bgcolor='#DEE1E2' align="center">Part Number</td>
            <td width="5%" class="NArialR" bgcolor='#DEE1E2' align="center">Vendor Part Number</td>
            <td width="5%" class="NArialR" bgcolor='#DEE1E2' align="center" wrap>Description</td>
            <td width="5%" class="NArialR" bgcolor='#DEE1E2' align="center" wrap>Req. Date</td>
            <td width="5%" class="NArialR" bgcolor='#DEE1E2' align="center" wrap>Promised Date</td>
            <td width="5%" class="NArialR" bgcolor='#DEE1E2' align="center">Requested Quantity</td>
            <td width="5%" class="NArialR" bgcolor='#DEE1E2' align="center">Quantity Cancelled</td>
            <td width="5%" class="NArialR" bgcolor='#DEE1E2' align="center">Unit Cost</td>
            <td width="5%" class="NArialR" bgcolor='#DEE1E2' align="center">Ext. Cost</td>
        </tr>
        <% int j = 1; %>
        <nested:iterate id= "PurchaseOrderLineItem" property="purchaseOrderLineItemList" type="com.scalar.chiptrack.finance.purchaseorder.PurchaseOrderLineItem" >
        <tr height=20>
            <td bgcolor='#FFFFEE' class="NArialRS" align="center"><%=j%></td>
            <td bgcolor='#FFFFEE' class="NArialRS" align="center"><nested:write property="marketingPartNo" />&nbsp;</td>
			<td bgcolor='#FFFFEE' class="NArialRS" align="center"><nested:write property="manufacturingPartNo" />&nbsp;</td>
            <td bgcolor='#FFFFEE' class="NArialRS" align="center" wrap><nested:write property="lineItemDescription" />&nbsp;</td>
            <td bgcolor='#FFFFEE' class="NArialRS" align="center" wrap><nested:write property="requiredDate"/>&nbsp;</td>
            <td bgcolor='#FFFFEE' class="NArialRS" align="center" wrap><nested:write property="promisedDate"/>&nbsp;</td>
            <td bgcolor='#FFFFEE' class="NArialRS" align="center"><%= (int) ((PurchaseOrderLineItem)PurchaseOrderLineItem).getRequestedQuantity() %>&nbsp;</td>
            <td bgcolor='#FFFFEE' class="NArialRS" align="center"><%= (int) ((PurchaseOrderLineItem)PurchaseOrderLineItem).getQuantityCancelled() %>&nbsp;</td>
            <td bgcolor='#FFFFEE' class="NArialRS" align="right"><nested:write property="unitCostAsString"/>&nbsp;</td>
            <td bgcolor='#FFFFEE' class="NArialRS" align="right"><nested:write property="extendedCostAsString"/>&nbsp;</td>
        </tr>
        <%j++;%>
       </nested:iterate>
     </table>
    </td></tr>
    <tr><td colspan=5><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=5></td></tR>
     <tr><td colspan='5'>
        <table width="25%" border=1 align=right bordercolor='#000000'  cellspacing='0' cellpadding='0'>
        <tr><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=5></td></tR>
        <tr>
            <td bgcolor='#DEE1E2' class="NArialR">Sub Total</td><td bgcolor='#DEE1E2' class="NArialL"  align="right"><nested:write property="subTotalAsString" /></td>
        </tr>
        <tr><td bgcolor='#DEE1E2' class="NArialR" nowrap>Trade Discount</td><td bgcolor='#DEE1E2'  class="NArialL" align="right"><nested:write property="tradeDiscountAsString" /></td>
        </tr>
        <tr><td bgcolor='#DEE1E2' class="NArialR">Freight</td><td bgcolor='#DEE1E2'  class="NArialL" align="right"><nested:write property="freightAsString" /></td>
        </tr>
        <tr><td bgcolor='#DEE1E2' class="NArialR">Miscellaneous</td><td class="NArialL" bgcolor='#DEE1E2' align="right"><nested:write property="miscellaneousAsString" /></td>
        </tr>
        <tr><td bgcolor='#DEE1E2' class="NArialR">Tax</td><td  class="NArialL" bgcolor='#DEE1E2' align="right"><nested:write property="taxAsString" /></td>
        </tr>
        <tr><td bgcolor='#DEE1E2' class="NArialR">Order Total</td><td  class="NArialL" bgcolor='#DEE1E2' align="right"><nested:write property="totalAsString" /></td>
        </tr>
        </nested:nest>
       </table></td></tr>
    </table>
   </td></tr>
</table>
<!--/p-->
</html:form>
</html:html>
<!-- till here -->
</BODY>
</HTML>
